//
//  JJResourceManager.m
//  ClaimPlatform_RN
//
//  Created by gongjian on 2018/5/18.
//  Copyright © 2018 jj. All rights reserved.
//



#import "JJResourceManager.h"

#import "NSData+JJ.h"

@implementation JJResourceManager

+ (instancetype)sharedInstance
{
    static dispatch_once_t once;
    static JJResourceManager *instance;
    dispatch_once(&once, ^{
        instance = [[self alloc] init];
    });
    return instance;
}

- (instancetype)init
{
    self = [super init];
    if (self)
    {
        [self __initAppConfig];
    }
    return self;
}


- (void)__initAppConfig {
    NSString *filePath = [[NSBundle mainBundle] pathForResource:@"JJAPPConfig" ofType:@"json"];
    NSData *data = [[NSData alloc] initWithContentsOfFile:filePath];
    self.appConfig = [data jj_dictionaryWithJSON];
}

@end
